{include file="public/header" /}
<style type="text/css">
/*强制table不换行*/
/*table td{word-break: keep-all;white-space:nowrap;}*/
/*table th{word-break: keep-all;white-space:nowrap;}*/
.tableWordVerak {
    word-break: keep-all;white-space:nowrap;
}
.tableWordVreakNone{
    white-space: normal !important;word-break: normal !important;
}
.laydate-icon {
    background: transparent !important;
}
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <!-- Panel Other -->
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>订单列表</h5>
        </div>
        <div class="ibox-content">
            <!--搜索框开始-->
            <div class="row">
                <div class="col-sm-12">
                    <div class="col-sm-10">
                    <form method="post" action="{:url('index')}" id="searchForm" class="form-inline">
                        <label for="">订单号</label>
                        <input type="text" name="order_no" value="{$order_no|default=''}" class="form-control">

                        <label for="">订单状态</label>
                        {:getEnumSelectWidget(config("enum.orderStatus"), 'order_status', '-请选择订单状态-', isset($order_status) ? $order_status : '-999', 1)}

                        <button class="btn btn-success btn-sm" type="submit" style="margin-bottom:0;margin-left:4px"><i class="fa fa-filter"></i> 筛选</button>
                        <a class="btn btn-primary btn-sm"  style="margin-bottom:0" href="{:url('index')}"><i class="fa fa-filter"></i> 重置</a>
                    </form>
                    </div>
                </div>
            </div>
            <!--搜索框结束-->
            <div class="hr-line-dashed"></div>

            <div class="example-wrap">
                <div class="example">
                    <div style="overflow-x:scroll;width:100%;">
                    <table class="table table-bordered table-hover">
                        <thead>
                            <tr class="long-tr">
                                <th>订单号</th>
                                <th>推广位</th>
                                <th>买家头像</th>
                                <th>买家名称</th>
                                <th>商品名称</th>
                                <th>商品图片</th>
                                <th>付款金额</th>
                                <th>已赚佣金</th>
                                <th>订单状态</th>
                                <th>是否返佣结算</th>
                                <th>创建时间</th>
                                <!--<th>操作</th>-->
                            </tr>
                        </thead>
                        <tbody id="list-content">
                            {foreach $list as $vo}
                                <tr class="long-td tableWordVerak">
                                    <td>{$vo.order_no}</td>
                                    <td>{$vo.pid}</td>
                                    <td>
                                        <div class="layer-photos-demo">
                                            <img src="{$vo.headimgurl}" style="height:40px;">
                                        </div>
                                    </td>
                                    <td>{$vo.nickname}</td>
                                    <td class="tableWordVreakNone" style="width:20%;">{$vo.goods_name}</td>
                                    <td>
                                        <div class="layer-photos-demo">
                                            <img src="{$vo.goods_img}" style="height:40px;">
                                        </div>
                                    </td>
                                    <td>{$vo.real_total_money}</td>
                                    <td>{$vo.commission}</td>
                                    <td>{:getEnumString(config('enum.orderStatus'), $vo.order_status)}</td>
                                    <td>{:getEnumString(config('enum.isSettlement'), $vo.is_settlement)}</td>
                                    <td>{$vo.yx_create_time}</td>
                                </tr>
                            {/foreach}
                        </tbody>
                    </table>
                    </div>
                    <div id="laypage"></div>
                </div>
            </div>
            <!-- End Example Pagination -->
        </div>
    </div>
</div>
<!-- End Panel Other -->
</div>

{include file="public/footer" /}

<script type="text/javascript">
layer.photos({
  photos: '.layer-photos-demo'
  ,anim: false //0-6的选择，指定弹出图片动画类型，默认随机（请注意，3.0之前的版本用shift参数）
});

layui.use(['laypage', 'layer'], function(){
  var laypage = layui.laypage
  ,layer = layui.layer;

  //完整功能
  laypage.render({
    elem: 'laypage'
    ,count: '{$list->total()}' // 总数据条数
    ,curr: '{$list->currentPage()}' // 当前第几页
    ,limit: '{$list->listRows()}'   // 每页显示条数
    ,layout: ['count', 'prev', 'page', 'next', 'refresh', 'skip']
    ,jump: function(obj, first){
      //首次不执行
      if(!first){
            $("#searchForm").attr('action', '{:url("index")}?page='+obj.curr);
          $("#searchForm").submit();
      }
    }
  });
});
</script>

</body>
</html>